package com.cupk.dtos;

import jakarta.validation.constraints.*;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;

@Data
public class CreateFundingRequest {

    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @NotBlank(message = "收支类型不能为空")
    @Pattern(regexp = "^(INCOME|EXPENSE)$", message = "收支类型必须是 'INCOME' 或 'EXPENSE'")
    private String fundingType;

    @NotBlank(message = "经费类别不能为空")
    private String category;

    @NotNull(message = "金额不能为空")
    @DecimalMin(value = "0.01", message = "金额必须大于0")
    private BigDecimal amount;

    @NotBlank(message = "描述不能为空")
    @Size(max = 500, message = "描述不能超过500个字符")
    private String description;

    @NotBlank(message = "交易日期不能为空")
    private String transactionDate;

    private String receiptNumber;
    private List<String> attachments;
}